package com.app.micaihu.view.main.dialog

import android.os.Bundle
import com.app.base.BaseBottomSheetDialogFragment
import com.app.micaihu.R
import com.app.micaihu.configure.Config
import com.app.micaihu.view.utils.DownloadAgainUtils
import kotlinx.android.synthetic.main.army_member_menu_dialog.tvCancel
import kotlinx.android.synthetic.main.game_net_change_dialog.*

/**
 * 4g 弹框
 * */
class NetChangeDialog : BaseBottomSheetDialogFragment() {

    override fun getLayoutId() = R.layout.game_net_change_dialog

    override fun getBundle(bundle: Bundle) {
        super.getBundle(bundle)
        downLoadFileSize = bundle.getInt(Config.Extra.max)
    }

    var downLoadFileSize = 0
    override fun setData() {
        tvTitle.text = "${downLoadFileSize}个下载已暂停"
    }

    override fun addListeners() {
        tvCancel.setOnClickListener { dismiss() }
        tvDownload.setOnClickListener {
            dismiss()
            DownloadAgainUtils.downLoadGame()
        }
    }
}